package de.herberlin.server.httpd;

import java.net.Socket;

import de.herberlin.server.common.AbstractServer;
import de.herberlin.server.common.ConfigConstants;
import de.herberlin.server.common.Configuration;
import de.herberlin.server.common.event.ApplicationEvent;
import de.herberlin.server.common.event.ServerStartEvent;

/**
 * Http Server to set up the old Bremsserver Module
 *
 * @author hans joachim herbertz created 27.12.2003
 */
public class HttpServer extends AbstractServer {

	/**
	 * @see de.herberlin.server.AbstractServer#process(java.net.Socket)
	 */
	protected void process(Socket client) {
		new HttpThread(client);
	}

	protected int getPort() {
		return Configuration.getPrefs().getInt(
				ConfigConstants.MODE_HTTP + ConfigConstants.SETTING_PORT, 80);
	}
	protected ApplicationEvent getServerStartEvent() {
		return new ServerStartEvent("Http Server",new String[]{
				"Time","Request","Response","Content"
		});
	}

}
